package com.yuandengta.yomall.order.service;

import com.yuandengta.yomall.order.vo.PayAsyncVO;
import com.yuandengta.yomall.order.vo.PayVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 支付宝支付接口 {@link AliPayService}
 *
 * @author Kevin
 * @email: 178676392@qq.com
 */
public interface AliPayService {

    /**
     * 支付
     * @param orderSn
     * @return
     */
    String pay(String orderSn);

    /**
     * 支付成功异步回调
     * @param vo
     * @param request
     * @return
     * @throws Exception
     */
    String payNotify(PayAsyncVO vo, HttpServletRequest request) throws Exception;

    /**
     * 关闭交易
     * @param outTradeNo
     * @throws Exception
     */
    void close(String outTradeNo) throws Exception;
}
